﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Windows.Forms;

namespace MoneyTrackin
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [MTAThread]
        static void Main()
        {
            SetupAutorunApp();
            Logic.Instance.ToString();
            Application.Run(new MainForm());
        }

        static void SetupAutorunApp()
        {
            //string path;
            //path = System.IO.Path.GetDirectoryName(
            //   System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
            //path += "\\" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;
            //OpenNETCF.WindowsCE.Notification.Notify.RunAppAtEvent(path,
            //    OpenNETCF.WindowsCE.Notification.NotificationEvent.NetConnect);

            OpenNETCF.WindowsCE.DeviceManagement.SynchronizationComplete += new OpenNETCF.WindowsCE.DeviceNotification(Logic.Instance.TryToSubmit);

        }        
    }
}